import React from 'react';
// import { render } from 'react-dom';
import MusicListItem from '../components/musicListItem'

class MusicList extends React.Component {
  constructor(props) {
    super(props)
  }

  render() {
    let listElement = null;
    listElement = this.props.musicList.map((item) => {
      return (
        <MusicListItem
          focus={item === this.props.musicItem}
          key={item.id}
          musicItem={item}
        />)
    });
    return(
      <ul>
        {listElement}
      </ul>
    )
  }
}

export default MusicList;
